package com.xxmw.transaction.service.robot.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xxmw.transaction.mapper.robot.RobotStrategyMapper;
import com.xxmw.transaction.model.robot.RobotStrategy;
import com.xxmw.transaction.service.robot.RobotStrategyService;
import org.springframework.stereotype.Service;

/**
 * @author luowenliang
 * @since 2020/2/23 13:58
 */
@Service
public class RobotStrategyServiceImpl extends ServiceImpl<RobotStrategyMapper, RobotStrategy> implements RobotStrategyService {

    @Override
    public RobotStrategy getByBourseAndSymbol(Integer bourse, String symbol) {
        QueryWrapper<RobotStrategy> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("bourse", bourse);
        queryWrapper.eq("symbol", symbol);
        return getOne(queryWrapper);
    }
}
